const getters = {
  sidebar: state => state.app?.sidebar,
  device: state => state.app?.device,
  // 建立对 user 模块里面的 token 的快捷访问
  userId: state => state.user.userInfo?.userId,
  token: state => state.user?.token,
  avatar: state => state.user?.avatar,
  name: state => state.user.userInfo?.username,
  staffPhoto: state => state.user.userInfo?.staffPhoto,
  routes: state => state.user?.routes,
  deptName: state => state.user.userInfo?.departmentName
}
export default getters
